package com.rules.admin.unit;


import com.google.common.collect.Lists;
import com.rules.admin.unit.expect.Expect;
import com.rules.admin.unit.mock.Mock;

import java.util.List;

public class UnitCase {
   private String artifactId;
   private String groupId;
   private String unitCaseName;
   private List<Object> inParameters = Lists.newArrayList();
   private List<Expect> expects;
   private List<Mock> mocks;

   public String getArtifactId() {
      return this.artifactId;
   }

   public void setArtifactId(String artifactId) {
      this.artifactId = artifactId;
   }

   public String getGroupId() {
      return this.groupId;
   }

   public void setGroupId(String groupId) {
      this.groupId = groupId;
   }

   public List<Object> getInParameters() {
      return this.inParameters;
   }

   public void setInParameters(List<Object> inParameters) {
      this.inParameters = inParameters;
   }

   public List<Expect> getExpects() {
      return this.expects;
   }

   public void setExpects(List<Expect> expects) {
      this.expects = expects;
   }

   public List<Mock> getMocks() {
      return this.mocks;
   }

   public void setMocks(List<Mock> mocks) {
      this.mocks = mocks;
   }

   public String getUnitCaseName() {
      return this.unitCaseName;
   }

   public void setUnitCaseName(String unitCaseName) {
      this.unitCaseName = unitCaseName;
   }

   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof UnitCase)) {
         return false;
      } else {
         UnitCase other = (UnitCase)o;
         if (!other.canEqual(this)) {
            return false;
         } else {
            Object this$artifactId = this.getArtifactId();
            Object other$artifactId = other.getArtifactId();
            if (this$artifactId == null) {
               if (other$artifactId != null) {
                  return false;
               }
            } else if (!this$artifactId.equals(other$artifactId)) {
               return false;
            }

            Object this$groupId = this.getGroupId();
            Object other$groupId = other.getGroupId();
            if (this$groupId == null) {
               if (other$groupId != null) {
                  return false;
               }
            } else if (!this$groupId.equals(other$groupId)) {
               return false;
            }

            Object this$unitCaseName = this.getUnitCaseName();
            Object other$unitCaseName = other.getUnitCaseName();
            if (this$unitCaseName == null) {
               if (other$unitCaseName != null) {
                  return false;
               }
            } else if (!this$unitCaseName.equals(other$unitCaseName)) {
               return false;
            }

            label62: {
               Object this$inParameters = this.getInParameters();
               Object other$inParameters = other.getInParameters();
               if (this$inParameters == null) {
                  if (other$inParameters == null) {
                     break label62;
                  }
               } else if (this$inParameters.equals(other$inParameters)) {
                  break label62;
               }

               return false;
            }

            label55: {
               Object this$expects = this.getExpects();
               Object other$expects = other.getExpects();
               if (this$expects == null) {
                  if (other$expects == null) {
                     break label55;
                  }
               } else if (this$expects.equals(other$expects)) {
                  break label55;
               }

               return false;
            }

            Object this$mocks = this.getMocks();
            Object other$mocks = other.getMocks();
            if (this$mocks == null) {
               if (other$mocks != null) {
                  return false;
               }
            } else if (!this$mocks.equals(other$mocks)) {
               return false;
            }

            return true;
         }
      }
   }

   protected boolean canEqual(Object other) {
      return other instanceof UnitCase;
   }

   public int hashCode() {

      int result = 1;
      Object $artifactId = this.getArtifactId();
      result = result * 59 + ($artifactId == null ? 43 : $artifactId.hashCode());
      Object $groupId = this.getGroupId();
      result = result * 59 + ($groupId == null ? 43 : $groupId.hashCode());
      Object $unitCaseName = this.getUnitCaseName();
      result = result * 59 + ($unitCaseName == null ? 43 : $unitCaseName.hashCode());
      Object $inParameters = this.getInParameters();
      result = result * 59 + ($inParameters == null ? 43 : $inParameters.hashCode());
      Object $expects = this.getExpects();
      result = result * 59 + ($expects == null ? 43 : $expects.hashCode());
      Object $mocks = this.getMocks();
      result = result * 59 + ($mocks == null ? 43 : $mocks.hashCode());
      return result;
   }

   public String toString() {
      return "UnitCase(artifactId=" + this.getArtifactId() + ", groupId=" + this.getGroupId() + ", unitCaseName=" + this.getUnitCaseName() + ", inParameters=" + this.getInParameters() + ", expects=" + this.getExpects() + ", mocks=" + this.getMocks() + ")";
   }
}
